(continued from Using Hyperlinks)

Mathematic Expressions

Simple mathematics can be performed on numeric fields output in messages. The following operators can be used:

* (multiply)

/ (divide)

+ (add)

- (subtract)

The order of precedence is multiply and divide before adding and subtraction.

Nested [ ] equations are possible—e.g.

[[[1 + 2] * 3-4]/ [5-2]]

Which breaks down to:

[3 * 3-4]/ 3

5/ 3

= 1.666667

Message codes may be embedded e.g.

[<RETAIL> * .2]

One or more spaces must separate a number or message code and an operator. e.g. [<retail>*2} will not work. [<retail> * 2] will.

 

If negation is required add the negative sign to the number without a space. E.g. - [1 + 2] is equal to -3. Also [-1 + 2] is equal to 1. This means that (e.g.)

[-<RETAIL>] can be used to negate the retail amount.

 

Maths can only be used in PCM messages if the PCM holds just one pax break.

 

By default, values returned by maths expressions have no decimals. The decimal value can be controlled by using the code DP inside the math delimiters-[DP:2 <agent:tl>-<received>] will output the result to 2 decimal places.

 

INI setting

The System INI setting MATHDELIMITER must be set before mathematics can be used. There are two variables that are able to used

[

Or

^

The [ variable indicates that the mathematic expression will be inside square brackets e.g.,

[<retail:tl>-<received>]

Some fax software uses the square brackets to enclose fax specific commands, so the alternate math delimiter of the Ctrl character ^ (normally Shift 6) can be used. The closing character when ^ is used is the pipe symbol | (normally Shift \)—e.g.

^<retail:tl>-<received>|

Only the opening character needs to be set in the MATHDELIMTER ini.

(continued in Email Attachments)